<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var flag = true; //flag布尔型
        var flag1 = false;//flag1布尔型
        console.log(flag + 1);//true 参与加法运算当1来看
        console.log(flag1 + 1);//false 参与加法运算当0看
        //如果一个变量声明为赋值，就是undefined 未定义数字类型
        var str;
        console.log(str);
        var variable = undefined;
        console.log(variable + 'pink');  //undefinedpink
        console.log(variable + 1);  //NaN undefined 和数字相加，最后的结果是 NaN

        //空值null
        var space = null;
        console.log(space + 'pink');//nullpink
        console.log(space + 1); //1
    </script>
</head>
<body>
    
</body>
</html>